Matrix Form Hypothesis Testing